package com.geek.ui;

/**
 * 布局更新器
 */
public class FrameUpdater {

	private static volatile MainFrame frame;

	public static MainFrame getInstance(){
		if(frame == null){
			synchronized (FrameUpdater.class){
				if(frame == null){
					frame = new MainFrame("鼠标连点工具");
				}
			}
		}
		return frame;
	}

	public static MainFrame openWindow() {
		MainFrame frame = FrameUpdater.getInstance();
		frame.setVisible(true);
		return frame;
	}

	public static void updateWindow(){
		MainFrame frame = FrameUpdater.getInstance();
		frame.updateWindow();
	}

}
